package json;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import java.util.Date;

/**
 * @describe:
 * @author: houkai
 */
@JsonPropertyOrder({ "birth_Date", "name" })
public class User {
    private String name;
    private boolean sex;
    private int age;
    private String homeAddress;
    private Date date;

    public User() {
    }

    public User(String name, boolean sex, int age, String homeAddress, Date date) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.homeAddress = homeAddress;
        this.date = date;
    }

    public User(String name, boolean sex, int age, String homeAddress) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.homeAddress = homeAddress;
        this.date = date;
    }

    public static User init(){
        return new User("张三", true, 19, "陕西西安");
    }

    public static User init_1(){
        return new User("张三", true, 19, "陕西西安", new Date());
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getHomeAddress() {
        return homeAddress;
    }

    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", sex=" + sex +
                ", age=" + age +
                ", homeAddress='" + homeAddress + '\'' +
                ", date=" + date +
                '}';
    }
}
